package com.test.project.system.pingwei.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.test.project.system.pingwei.mapper.TPingweiMapper;
import com.test.project.system.pingwei.domain.TPingwei;
import com.test.project.system.pingwei.service.ITPingweiService;
import com.test.common.utils.security.ShiroUtils;
import com.test.common.utils.text.Convert;

/**
 * 比赛评委Service业务层处理
 * 
 * @author test
 * @date 2023-12-05
 */
@Service
public class TPingweiServiceImpl implements ITPingweiService 
{
    @Autowired
    private TPingweiMapper tPingweiMapper;

    /**
     * 查询比赛评委
     * 
     * @param id 比赛评委ID
     * @return 比赛评委
     */
    @Override
    public TPingwei selectTPingweiById(Long id)
    {
        return tPingweiMapper.selectTPingweiById(id);
    }

    /**
     * 查询比赛评委列表
     * 
     * @param tPingwei 比赛评委
     * @return 比赛评委
     */
    @Override
    public List<TPingwei> selectTPingweiList(TPingwei tPingwei)
    {
        return tPingweiMapper.selectTPingweiList(tPingwei);
    }

    /**
     * 新增比赛评委
     * 
     * @param tPingwei 比赛评委
     * @return 结果
     */
    @Override
    public int insertTPingwei(TPingwei tPingwei)
    {
        
        
        
        tPingwei.setCreateBy(ShiroUtils.getLoginName());
        
        return tPingweiMapper.insertTPingwei(tPingwei);
    }

    /**
     * 修改比赛评委
     * 
     * @param tPingwei 比赛评委
     * @return 结果
     */
    @Override
    public int updateTPingwei(TPingwei tPingwei)
    {
        return tPingweiMapper.updateTPingwei(tPingwei);
    }

    /**
     * 删除比赛评委对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTPingweiByIds(String ids)
    {
        return tPingweiMapper.deleteTPingweiByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除比赛评委信息
     * 
     * @param id 比赛评委ID
     * @return 结果
     */
    @Override
    public int deleteTPingweiById(Long id)
    {
        return tPingweiMapper.deleteTPingweiById(id);
    }
}
